""""
CPEM Base Server - libs/CPEMBaseServer.py
(C)opyright 2010, Corey J. Steele, all rights reserved.

by Corey J. Steele <coreyjsteele@gmail.com>

This is the base CPEM server that gets registered with and who's methods are 
called by clients connecting to the SecureXMLServer.
"""
from Version import *
from Registry import *

class CPEMBaseServer:
	"""CPEMBaseServer Class
	Creates the base CPEM Server Class, which handles serving the Registry to 
	client connections, and protocol version matching.
	"""
	cpemVersion = None
	reg = None

	def __init__(self):
		self.cpemVersion = Version(0,0,1)
		self.reg = SQLRegistry()


	def ver(self):
		"""ver()
		"""
		return self.cpemVersion


	def get(self,variable):
		"""get()
		"""
		return reg.fetch(variable)
		'''end get()'''


	def set(self,variable,value):
		"""set()
		"""
		#TODO: this needs to interface with the SQLRegistry so we can do simple
		# get and set operations on the Registry
		pass
		'''end set()'''

	def getScope(self,scope):
		"""getScope()
		"""
		# TODO: this will be the one that returns an array of all the variables in a scope.
		pass

'''EOF'''
